<script setup>
import { ref } from 'vue';
let status = ref(true)
let gender = ref("男")

</script>

<template>
    <form action="https://httpbin.org/get" method="get">
        <!-- 单选按钮通过 name 属性分组 -->
        <label for="male">
            <input type="radio" name="gender" id="male" value="男" v-on:click="status=false" v-model="gender" checked>男
        </label>

        <label for="female">
            <input type="radio" name="gender" id="female" value="女" v-on:click="status=false" v-model="gender">女
        </label>

        <br>

        <input type="reset" value="重置">
        <input type="submit" value="提交" v-bind:disabled="status">
    </form>
    <h2>你选中的性别是：{{ gender }}</h2>
</template>

<style scoped>
</style>